/*
 *Author:Jackong
 *Date:2012/07/04
 */
#pragma once
#include "buf\recv_buf.h"
#include "buf\send_buf.h"
#include "conn_info.h"

namespace fly {

	namespace jld{

		namespace server {	
			using namespace buffer;
			class handler
			{
			protected:
			handler* handler_;
			TARGET target_;
			public:
				//default the handler with NULL
				handler();
				virtual ~handler();
				//set next handler(NULL for tail end)
				handler* set_next(handler* hnd);
				//recv_buf chain of handler
				virtual bool handle_recv(recv_buf& recv_buf, send_buf& send_buf, conn_info& conn_info);
			};

		}
	}
}